import { WitRouterProp } from '@/router/types';

// 封装路由
export const routes: Array<WitRouterProp> = [
  {
    path: '/home', // 跳转路由
    name: '首页', // 菜单显示文字
    icon: 'icon-fuwuqi', // 菜单ico
    component: 'Home',
  },
  {
    path: '/system',
    name: '系统设置',
    icon: 'icon-fuwuqi',
    component: 'Layout',
    children: [
      {
        path: '/system/user',
        name: '用户管理',
        icon: 'icon-fuwuqi',
        component: 'User',
      },
      {
        path: '/system/role',
        name: '角色管理',
        icon: 'icon-fuwuqi',
        component: 'Role',
      },
      {
        path: '/system/menu',
        name: '菜单管理',
        icon: 'icon-fuwuqi',
        component: 'Menu',
      },
    ],
  },
  {
    path: '/Template',
    name: '表格模板',
    icon: 'icon-fuwuqi',
    component: 'Template',
  },
];

// 无验证路由
export const baseRoutes: Array<WitRouterProp> = [
  {
    path: '/Login',
    name: '登录',
    component: 'Login',
  },
  {
    path: '*',
    name: '404',
    icon: 'icon-fuwuqi',
    component: 'NotFind',
  },
];
